/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ws
 * Date: 2022-12-04
 * Time: 15:10
 */
public class Person {
    public String name;
    public int age;
    public Person() {
        //显示定义
    }
    public Person(String pname, int page) {
        name = pname;
        age = page;
    }
    public void Display() {
        System.out.println(name + " " + age);
    }
    public static void main(String[] args) {
        Person person = new Person();//不报错
        Person person1 = new Person("张三", 18);
        person.Display();
        person1.Display();
    }
}
